//
//  WaitEvaluateCell.m
//  FKGW
//
//  Created by song ce on 2017/2/22.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "WaitEvaluateCell.h"
#import "UIView+Extend.h"
#import "OSSHelper.h"
@implementation WaitEvaluateCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle= UITableViewCellSelectionStyleNone;
    
}

-(void)setModel:(WaitEvaluateModel *)model{
    [[OSSHelper sharedHelper] OSSDownLoadWithObjectKey:_model.pPic downLoadBlock:^(NSData *data) {
        dispatch_async(dispatch_get_main_queue(), ^{
            self.goodsImageView.image = [UIImage imageWithData:data];
        });
    }];
    self.goodsNameLabel.text = _model.pName;
    self.priceLabel.text = _model.pPrice;
    self.standardLabel.text = _model.pProperty;
    self.countLabel.text = _model.pNum;
}

//删除
- (IBAction)returnMoney:(UIButton *)sender {
    if(self.deleteUnEvaluateBlock){
        self.deleteUnEvaluateBlock();
    }
}
//评价
- (IBAction)evaluate:(UIButton *)sender {
    if(self.evaluateBlock){
        self.evaluateBlock();
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
